package com.qfedu.dao;

import com.qfedu.entity.User;

import java.sql.SQLException;

public interface UserDao {
    /**
     * 根据用户名  查询用户
     * @param username
     * @return
     * @throws SQLException
     */
    User findUserByUserName(String username) throws SQLException;

    /**
     * 添加新用户
     * @param user
     * @return
     */
    int insertUser(User user) throws SQLException;

    /**
     * 根据激活码修改用户的激活状态
     * @param status
     * @param code
     * @return
     */
    int updateUserStatusByCode(String status, String code) throws SQLException;

}
